package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author long
 * @since 2025-07-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_platform_order_sync_record_item")
@NoArgsConstructor
public class PlatformOrderSyncRecordItemDo extends Model<PlatformOrderSyncRecordItemDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("sync_id")
    private Long syncId;

    @TableField("platform_order_no")
    private String platformOrderNo;

    /**
     * 平台订单表主键
     */
    @TableField("platform_order_id")
    private Long platformOrderId;

    @TableField("store_id")
    private Long storeId;

    @TableField("company_id")
    private Long companyId;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;


    public PlatformOrderSyncRecordItemDo(Long syncId, String platformOrderNo, Long platformOrderId, Long storeId, Long companyId) {
        this.syncId = syncId;
        this.platformOrderNo = platformOrderNo;
        this.platformOrderId = platformOrderId;
        this.storeId = storeId;
        this.companyId = companyId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
